import request from '@/utils/request';
/**
 * @desc 普通上传接口
 */
export const uploadMediaUrl = process.env.VUE_APP_BASE_API + '/upload/uploadMedia'

/**
 * @desc 单个视频上传新增接口
 */
export const videoInsertUrl = process.env.VUE_APP_BASE_API + '/videoDynamic/uploadVideo'

/**
 * @desc 普通上传
 */
export function uploadMedia(data) {
    return request({
        url: '/upload/uploadMedia',
        method: 'post',
        data,
        contentType: false,
        processData: false
    });
}

/**
 * @desc 上传至阿里云OSS
 */
export function ossUpload(data) {
    return request({
        url: '/upload/multipleImgOssSave',
        method: 'post',
        data,
        contentType: false,
        processData: false
    });
}

/**
 * @desc TinyMce的远程图片抓取
 * @param {Array} data
 */
export function catchImgs(data = []) {
    return request({
        url: '/upload/fileUrl',
        method: 'post',
        data
    });
}

